//
//  ViewController.m
//  KKThread
//
//  Created by Mac mini on 16/2/3.
//  Copyright © 2016年 JuniorCodingPerson. All rights reserved.
//

#import "RootViewController.h"

#import "UIImageView+Gif.h"

@interface RootViewController () {
    
}

@end

@implementation RootViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    NSString *filePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent: @"003.gif"];
    
    UIImageView *imageView = [[UIImageView alloc] initWithFrame: CGRectMake(100, 100, 49, 49)];
    [imageView kk_loadingGifImageWithPath: filePath];
    [self.view addSubview: imageView];
    
//    NSData *imageData = [NSData dataWithContentsOfFile: filePath];
//    UIWebView *webView = [[UIWebView alloc] initWithFrame: CGRectMake(100, 200, 56, 56)];
//    webView.userInteractionEnabled = false;
//    [webView loadData: imageData MIMEType: @"image/gif" textEncodingName: nil baseURL: [NSURL URLWithString: [[NSBundle mainBundle] resourcePath]]];
//    [self.view addSubview: webView];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Action methods

@end
